package proxy;

import org.apache.log4j.Logger;
import service.Buyer;

/**
 * 代理类 (中介)
 * @version v1.0
 * @Author JieGe
 * @Create 2024-11-30 - 11:41
 */
public class IntermediaryImpl implements Buyer {
    private Logger logger = Logger.getLogger(IntermediaryImpl.class);

    // 内部含有对真实主题的引用
    private Buyer target;
    // 依赖倒置原则。 利用构造方法实现依赖对象的传递
    public IntermediaryImpl(Buyer target) {
        this.target = target;
    }

    /**
     * 中介也具备看房的功能
     * @return
     */
    @Override
    public String havealook() {
        return "";
    }
}
